<template>
  <div>
    <el-form :inline="true" class="demo-form-inline">
      <el-form-item label="名称:">
        <el-input size="small" v-model="searchPar" placeholder="请输入名称"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button size="small" type="primary" @click="onSubmit">查询</el-button>
        <el-button type="info" size="small"
                   plain @click="searchPar=''">重置</el-button>
        <el-button size="small" type="primary" @click="addTag">新增</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "searchForm",
  data() {
    return {
      list:[],
      searchPar:''
    }
  },
  watch:{
    searchPar(){
      console.log(999)
      console.log(this.searchPar)
      this.$emit('sub')
    }
  },
  created() {

    //this.getPer()
  },
  methods: {
    onSubmit() {
      console.log('submit!');
      this.$emit('sub')
    },
    addTag(){
      console.log('add!');
      this.$emit('add')
    }
  }
}
</script>

<style scoped>

</style>
